package com.wn.sk.product.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.wn.sk.product.entity.Product;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wn.sk.product.entity.vo.PromotionOrderVo;
import com.wn.sk.product.entity.vo.PromotionProductVo;

import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author yellow docker
 * @since 2022-11-07
 */
public interface IProductService extends IService<Product> {

    /**
     * 查询操作 ( 秒杀商品 )
     * @return
     */
    List<PromotionProductVo> findPromotionProduct(int status) throws JsonProcessingException;


    /**
     * 秒杀商品的下订单
     * @param promotionId
     * @param userId
     * @return
     */
    PromotionOrderVo submitOrder(Integer promotionId, String userId);


}
